<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="time">
  </div>

  <iframe src="http://localhost:3001/iframe/postmessage" frameborder="0"></iframe>

  <script>
    let el = document.querySelector('#time')
    window.addEventListener('message', (event) => {
      el.innerHTML = event.data
    })
  </script>
</body>
</html>